import time

def buble (mas):
        yop = True
        while yop == True:
                yop = False
        for j in range(len(mas)):
            if int(mas[i]) > int(mas[i + 1]):
                mas[i], mas[i + 1] = mas[i + 1],mas[i]
                yop = True
return mas

f1 = open('m1_sorted.txt')
f2 = open('m2_reverse.txt')
f3 = open('m3_shuffle.txt')

array1 = f1.readlines()
t_start = time.time()
x = buble(array1)
t_finish = time.time()
print ('Время_m1' , round((t_finish-t_start)) * 1000, 'c')

array2 = f2.readlines()
t_start = time.time()
x = buble(array2)
t_finish = time.time()
print ('Время_m2' , round((t_finish-t_start)) * 1000, 'c')

array3 = f3.readlines()
t_start = time.time()
x = buble(array3)
t_finish = time.time()
print ('Время_m3' , round((t_finish-t_start)) * 1000, 'c')

'''
fori in x:
print(i, end= ' ')
'''

